<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>03_布尔类型的转换</title>
</head>
<body>
  <script>
    //Boolean() 转换函数 被转换成false的五个值
    console.log(Boolean(''))
    console.log(Boolean(0))
    console.log(Boolean(null))
    console.log(Boolean(undefined))
    console.log(Boolean(NaN))
    //其他值都转换为true
    var n1 = 1;
    console.log(Boolean(n1));
  </script>
</body>
</html>